#include "image_set.h"
#include "ui_image_set.h"
#include "system.h"

image_set::image_set(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::image_set)
{
    ui->setupUi(this);

    ui->lineEdit_h->setText("32");
    ui->lineEdit_w->setText("32");
    ui->radioButton_chui_zhi->click();
}

image_set::~image_set()
{
    delete ui;
}

void image_set::on_pushButton_false_clicked()
{
    this->close();
}

void image_set::on_pushButton_true_clicked()
{
    image_message_t my_image_msg;
    my_image_msg.width = ui->lineEdit_w->text().toUInt();
    my_image_msg.hight = ui->lineEdit_h->text().toUInt();
    if(ui->radioButton_chui_zhi->isChecked())
        my_image_msg.align_type = 0;
    else
        my_image_msg.align_type = 1;
    emit get_image_msg(my_image_msg);
    this->close();
}
